package com.lzx.controller;

import com.lzx.domin.User;
import com.lzx.service.Userservice;
import com.lzx.toos.Tools;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.Map;

/**
 * <p>@Description: 文档注释</p>
 * <p>@author 作者/p>
 * <p>@Date: 2021/1/19</p>
 * <p>@Time: 17:03</p>
 */
@Controller
@RequestMapping("user")
public class logrescontroller {
    @Resource
    Userservice userservice;


    @RequestMapping("selectname")
    @ResponseBody
    public Map<String,Object> selectname(User user){
        System.out.println(user.getUserName());
        int count=userservice.selectname(user);
        return  count>0? Tools.succeed():Tools.failure();
    }

}
